<link type="text/css" href="<?=site_url()?>js/ui/themes/base/jquery.ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="<?=site_url()?>js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/ui/external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/ui/ui/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/ui/ui/jquery.ui.widget.min.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/ui/ui/jquery.ui.mouse.min.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/ui/ui/jquery.ui.draggable.min.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/ui/ui/jquery.ui.position.min.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/ui/ui/jquery.ui.resizable.min.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/ui/ui/jquery.ui.dialog.min.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/ui/ui/jquery.effects.core.min.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/ui/ui/jquery.effects.blind.min.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/ui/ui/jquery.effects.explode.min.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/ui/ui/jquery.ui.tabs.min.js"></script>
<style>
.ui-widget {
  font-size: 10pt;
}
.ui-tabs .ui-tabs-panel {
	padding: 0px;
}
</style>

<script type="text/javascript">
	$.fx.speeds._default = 1000;
	$(function() {
		$('#opener').click(function() {
			$('#dialogChange').dialog('open');
			return false;
		});

		$('#dialogChange').dialog({
			autoOpen: false,
			width: 400,
			height: 330,
			show: 'blind'
		});
		
		$('#dialogNews').dialog({
			autoOpen: false,
			width: 600,
			height: 600,
			show: 'blind'
		});

		$('#dialogDetail').dialog({
			autoOpen: false,
			width: 600,
			height: 400,
			show: 'blind'
		});

		 $("#tabs").tabs();
		 $("#tabs2").tabs();
	});

	function addDetail() {
		var obj = document.getElementById('dialogDetail');
		var ss = "";
		ss = '<div style="width:550px; height:400; overflow:auto;"><table width="550" class="style2"><tr bgcolor="#e5e5e5"><td align="center">สถานที่เรียน</td><td align="center">ชั้น</td><td align="center">วัน</td><td align="center">วิชาที่จะสอน</td><td align="center">เวลาที่จะสอน</td></tr>';
		var chkObj = document.getElementsByName('selected_chk[]');
		var xx = 0;
		for(var i = 0; i < chkObj.length; i++) {
			if(chkObj[i].checked == true) {
				var str = document.getElementsByName('stu_detail[]')[i].value.split("|");
				if(str.length == 3) {
					if(xx % 2 == 0) {
						ss += '<tr>';
					} else { 
						ss += '<tr bgcolor="#e5e5e5">';
					}	
					ss += '<td>'+str[0]+'</td>';
					ss += '<td>'+str[1]+'</td>';
					ss += '<td>'+str[2]+'</td>';
					ss += '<td  align="center"><input type="text" name="stu_detail_sub[]" /><span class="red">*</span></td>';
					ss += '<td  align="center"> <input type="text" name="stu_detail_time[]" /><span class="red">*</span></td>';
					ss += '</tr>';
					xx++;
				}
			}
		}
		ss += '</table><br><input type="button" onclick="javascript:validateDetail();" value="ยืนยันการเลือก"/>&nbsp;&nbsp;&nbsp;<input type="button" onclick="javascript:$(\'#dialogDetail\').dialog(\'close\');" value="ยกเลิกการเลือก"/></div>';
		obj.innerHTML = ss;
		$('#dialogDetail').dialog('open');
		return false;
	}

	function validateDetail() {
		var frm = document.forms["myForm3"];
		frm.action = '<?=site_url()?>TutorLogin/save';
		var obj1 = document.getElementsByName('stu_detail_sub[]');
		var obj2 = document.getElementsByName('stu_detail_time[]');
		for(i = 0; i < obj1.length; i++) {
			if(obj1[i].value == '') {
				obj1[i].focus();
				alert('กรุณาระบุวิชาที่จะสอนด้วยค่ะ');
				return;
			}
			if(obj2[i].value == '') {
				obj2[i].focus();
				alert('กรุณาระบุช่วงเวลาที่จะสอนด้วยค่ะ');
				return;
			}
		}
		var chkObj = document.getElementsByName('selected_chk[]');
		var t = 0;
		for(var i = 0; i < chkObj.length; i++) {
			if(chkObj[i].checked == true) {
				document.getElementsByName('stu_subj_detail[]')[t].value = obj1[t].value;
				document.getElementsByName('stu_time_detail[]')[t].value = obj2[t].value;
				t++;
			}
		}
		frm.submit();
	}
	
	function NewsDetail(n) {
		document.getElementById('dialogNews').innerHTML = '<p><span class="style2"><Strong>' + document.getElementById('tt' + n).value + ' </Strong></span></p>';
		document.getElementById('dialogNews').innerHTML += '<div class="style2" align="left">'+document.getElementById('dt' + n).value + '<br/></div><hr/>';
		if(document.getElementById('af' + n).value != "#")
			document.getElementById('dialogNews').innerHTML += '<div align="left"><span class="style1" >เอกสารแนบ: </span><a class="style1" target="_blank" href="' + document.getElementById('af' + n).value +'"> เปิดดูเอกสาร </a></div>';
		$('#dialogNews').dialog('open');
	}
	function validate() {
		if(document.getElementById('txtOldPass').value == '') {
			document.getElementById('txtOldPass').focus();
			alert('กรุณากรอกรหัสผ่านเดิม');
			return false;
		}
		if(document.getElementById('txtNewPass1').value == '') {
			document.getElementById('txtNewPass1').focus();
			alert('กรุณากรอกรหัสผ่านใหม่');
			return false;
		}
		if(document.getElementById('txtNewPass2').value == '') {
			document.getElementById('txtNewPass2').focus();
			alert('กรุณากรอกรหัสผ่านใหม่ (คอนเฟิร์ม)');
			return false;
		}
		if(document.getElementById('txtNewPass1').value != document.getElementById('txtNewPass2').value) {
			document.getElementById('txtNewPass1').focus();
			alert('กรุณากรอกรหัสผ่านใหม่ทั้งสองอันไม่เหมือนกัน');
			return false;
		}
		return true;
	}
</script>

<table width="916"  border="0" align="center" cellpadding="0" cellspacing="0" >
	<tr >
    <td valign="top">
    
    <table width="915" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
      <tr valign="top">
        <td width="86" height="1566" rowspan="3" valign="top"><img src="<?=site_url()?>images/toparent_14.jpg" width="86" height="2250" alt="" /></td>
        <td  bgcolor="#FFFFFF">
        
        <table width="700px" align="center" border="0" cellspacing="5">
          <tr>
            <td><font color="#003cff" size="2">สวัสดีค่ะ </font> <font color="#000000" size="3" style="font-weight: bolder;">ติวเตอร์ <?php echo $tutor_name;?> </font> <a href="#" id="opener"><font color="#0033CC" size="2" style="font-weight: bolder;">[เปลี่ยนพาสเวิร์ด]</font></a> <a href="<?=site_url()?>login/logout"><font color="#0033CC" size="2" style="font-weight: bolder;">[Logout]</font></a> </td>
          </tr>
          <tr>
            <td><font color="#000000" size="2">วันสุดท้ายที่ใช้งานได้: </font> <font color="#f71313" size="3" style="font-weight: bolder;"><?php echo $expire_date;?></font> </td>
          </tr>
          <tr>
            <td>
            <font color="#000000" size="2"> ติวเตอร์ทุกท่านสามารถปรึกษาเรื่องการสอนได้ รวมถึงติดต่อเรื่องอื่นๆ ได้ที่ โทร. 082-672-1222 หรือ
            <a href="mailto:connect_bvk@hotmail.com">connect_bvk@hotmail.com</a> ค่ะ</font> </td>
          </tr>
        </table>
       <form name="myForm2" method="post" action="<?=site_url()?>TutorLogin/cancel">
       <input type="hidden" name="tutorID" id="tutorID" value="<?php echo $tutor_id?>" />
        <table width="650" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td><img src="<?=base_url()?>images/tutorlogin/red_01.jpg" width="650" height="100" /></td>
          </tr>
          <tr height="200">
            <td background="<?=base_url()?>images/tutorlogin/red_02.jpg" align="center">
            	<div style="width:500px;">
            	<marquee scrolldelay="170" direction="up" height="170" onmouseover="this.setAttribute('scrollamount', 0, 0);" onmouseout="this.setAttribute('scrollamount', 6, 0);">
              		<?php $monthTh = array("","ม.ค.","ก.พ. ","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."); 
              			for($i = 0; $i < count($news); $i++) { ?>
				 		<span class="style2">
				 			<strong><?php echo $news[$i]->title;?></strong><br/>
				 			<?php echo ($news[$i]->intro);?>
				 		</span>
				 		<span class="style1">
				 			<a href="javascript:NewsDetail('<?php echo ($news[$i]->news_id);?>');" class="style1">&#3629;&#3656;&#3634;&#3609;&#3605;&#3656;&#3629; &gt;&gt;</a>
				 		</span><br/><br/>
				 		<input type="hidden" id="af<?php echo ($news[$i]->news_id);?>" value='<?php echo $news[$i]->att_file == null ? "#" : site_url()."data-image/news/".$news[$i]->att_file ;?>' />
				 		<input type="hidden" id="dt<?php echo ($news[$i]->news_id);?>" value='<?php echo ($news[$i]->detail);?>' />
				 		<input type="hidden" id="tt<?php echo ($news[$i]->news_id);?>" value='<?php echo ($news[$i]->title);?>' />
				 	<?php } ?>
              	</marquee>
              	</div>
			</td>
          </tr>
          <tr>
            <td><img src="<?=base_url()?>images/tutorlogin/red_03.jpg" width="650" height="40" /></td>
          </tr>
        </table><br />
		<table width="736" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td><img src="<?=base_url()?>images/tutorlogin/green_01.jpg" width="736" height="100" /></td>
          </tr>
          <tr>
            <td background="<?=base_url()?>images/tutorlogin/green_02.jpg" align="center">
            <div style="width:600px" align="left" class="style2">ติวเตอร์สามารถยกเลิกนักเรียนเหล่านี้ได้ เพราะยังอยู่ในระหว่างการติดต่อ </div>
            <br/>
            <div id="tabs" style="width:650px;">
			    <ul>
			        <li><a href="#fragment-11"><span>จันทร์</span></a></li>
			        <li><a href="#fragment-12"><span>อังคาร</span></a></li>
			        <li><a href="#fragment-13"><span>พุธ</span></a></li>
			        <li><a href="#fragment-14"><span>พฤหัสบดี</span></a></li>
			        <li><a href="#fragment-15"><span>ศุกร์</span></a></li>
			        <li><a href="#fragment-16"><span>เสาร์</span></a></li>
			        <li><a href="#fragment-17"><span>อาทิตย์</span></a></li>
			    </ul>
			    <div id="fragment-11"><br/>
	            	<div style="width:640px;height:300px; overflow-y: auto;" align="left" class="style2">
	            		<table class="style2"  width="640" border="1px solid #006600;" cellspacing="1" cellpadding="1" style="border:1px solid #006600;">
						  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/selectedstudent_01.jpg )">
						    <td style="border:1px solid #006600;" width="40" align="center"><input type="submit" name="btncancel" value="ยกเลิก" style="border: 2px solid #00ff0; background:#D2FFD2; color:#00000;"/></td>
						    <td style="border:1px solid #006600;" width="40" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
						    <td style="border:1px solid #006600;" width="70" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
						    <td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
						    <td style="border:1px solid #006600;" width="80"align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
						    <td style="border:1px solid #006600;" width="50"align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
							<td style="border:1px solid #006600;" width="50" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
							<td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
							<td style="border:1px solid #006600;" width="20"align="center"><font color="#ffffff"><b>เพศ</b></font></td>
						  </tr>
						  <?php
			              	if(isset($selected_stu) && count($selected_stu) > 0) {
			              		foreach ($selected_stu as $r) {
			              			if($r->dayy != 'mon')
			              			   continue;
			              ?>
						  <tr >
						    <td style="border:1px solid #006600;" align="center"> <input type="checkbox" name="cancel_chk[]" value="<?= $r->student_id?>,mon,<?= $r->maching_id?>,<?= $r->t_id?>" /></td>
						    <td style="border:1px solid #006600;"><?php if($r->study_start_date) {
						    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
						    }else{ echo '&nbsp;';}?></td>
						    <td style="border:1px solid #006600;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?php if($r->tm_subj) echo $r->tm_subj;?></td>
						    <td style="border:1px solid #006600;" align="center"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->school ? $r->school : '&nbsp;'?></td>
							<td style="border:1px solid #006600;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
						  </tr>
						  <?php } } ?>
						</table>
	            	</div>
            	</div>
            	<div id="fragment-12"> <br/>
	            	<div style="width:640px;height:300px; overflow-y: auto;" align="left" class="style2">
	            		<table class="style2" width="640" border="1px solid #006600;" cellspacing="1" cellpadding="1" style="border:1px solid #006600;">
						  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/selectedstudent_01.jpg )">
						    <td style="border:1px solid #006600;" width="40" align="center"><input type="submit" name="btncancel" value="ยกเลิก" style="border: 2px solid #00ff0; background:#D2FFD2; color:#00000;"/></td>
						    <td style="border:1px solid #006600;" width="40" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
						    <td style="border:1px solid #006600;" width="70" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
						    <td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
						    <td style="border:1px solid #006600;" width="80"align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
						    <td style="border:1px solid #006600;" width="50"align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
							<td style="border:1px solid #006600;" width="50" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
							<td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
							<td style="border:1px solid #006600;" width="20"align="center"><font color="#ffffff"><b>เพศ</b></font></td>
						  </tr>
						  <?php
						  	
			              	if(isset($selected_stu) && count($selected_stu) > 0) {
			              		foreach ($selected_stu as $r) {
			              			if($r->dayy != 'tue')
			              			   continue;
			              ?>
						  <tr >
						    <td style="border:1px solid #006600;" align="center"> <input type="checkbox" name="cancel_chk[]" value="<?= $r->student_id?>,tue,<?= $r->maching_id?>,<?= $r->t_id?>" /></td>
						    <td style="border:1px solid #006600;"><?php if($r->study_start_date) {
						    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
						    }else{ echo '&nbsp;';}?></td>
						    <td style="border:1px solid #006600;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?php if($r->tm_subj) echo $r->tm_subj;?></td>
						    <td style="border:1px solid #006600;" align="center"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->school ? $r->school : '&nbsp;'?></td>
							<td style="border:1px solid #006600;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
						  </tr>
						  <?php } } ?>
						</table>
	            	</div>
            	</div>
            	<div id="fragment-13"> <br/>
	            	<div style="width:640px;height:300px; overflow-y: auto;" align="left" class="style2">
	            		<table class="style2"  width="640" border="1px solid #006600;" cellspacing="1" cellpadding="1" style="border:1px solid #006600;">
						  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/selectedstudent_01.jpg )">
						    <td style="border:1px solid #006600;" width="40" align="center"><input type="submit" name="btncancel" value="ยกเลิก" style="border: 2px solid #00ff0; background:#D2FFD2; color:#00000;"/></td>
						    <td style="border:1px solid #006600;" width="40" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
						    <td style="border:1px solid #006600;" width="70" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
						    <td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
						    <td style="border:1px solid #006600;" width="80"align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
						    <td style="border:1px solid #006600;" width="50"align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
							<td style="border:1px solid #006600;" width="50" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
							<td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
							<td style="border:1px solid #006600;" width="20"align="center"><font color="#ffffff"><b>เพศ</b></font></td>
						  </tr>
						  <?php
						  	
			              	if(isset($selected_stu) && count($selected_stu) > 0) {
			              		foreach ($selected_stu as $r) {
			              			if($r->dayy != 'wed')
			              			   continue;
			              ?>
						  <tr >
						    <td style="border:1px solid #006600;" align="center"> <input type="checkbox" name="cancel_chk[]" value="<?= $r->student_id?>,wed,<?= $r->maching_id?>,<?= $r->t_id?>" /></td>
						    <td style="border:1px solid #006600;"><?php if($r->study_start_date) {
						    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
						    }else{ echo '&nbsp;';}?></td>
						    <td style="border:1px solid #006600;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?php if($r->tm_subj) echo $r->tm_subj ;?></td>
						    <td style="border:1px solid #006600;" align="center"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->school ? $r->school : '&nbsp;'?></td>
							<td style="border:1px solid #006600;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
						  </tr>
						  <?php } } ?>
						</table>
	            	</div>
            	</div>
            	<div id="fragment-14"> <br/>
	            	<div style="width:640px;height:300px; overflow-y: auto;" align="left" class="style2">
	            		<table class="style2"  width="640" border="1px solid #006600;" cellspacing="1" cellpadding="1" style="border:1px solid #006600;">
						  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/selectedstudent_01.jpg )">
						   <td style="border:1px solid #006600;" width="40" align="center"><input type="submit" name="btncancel" value="ยกเลิก" style="border: 2px solid #00ff0; background:#D2FFD2; color:#00000;"/></td>
						    <td style="border:1px solid #006600;" width="40" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
						    <td style="border:1px solid #006600;" width="70" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
						    <td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
						    <td style="border:1px solid #006600;" width="80"align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
						    <td style="border:1px solid #006600;" width="50"align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
							<td style="border:1px solid #006600;" width="50" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
							<td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
							<td style="border:1px solid #006600;" width="20"align="center"><font color="#ffffff"><b>เพศ</b></font></td>
						  </tr>
						  <?php
						  	
			              	if(isset($selected_stu) && count($selected_stu) > 0) {
			              		foreach ($selected_stu as $r) {
			              			if($r->dayy != 'thr')
			              			   continue;
			              ?>
						  <tr >
						    <td style="border:1px solid #006600;" align="center"> <input type="checkbox" name="cancel_chk[]" value="<?= $r->student_id?>,thr,<?= $r->maching_id?>,<?= $r->t_id?>" /></td>
						    <td style="border:1px solid #006600;"><?php if($r->study_start_date) {
						    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
						    }else{ echo '&nbsp;';}?></td>
						    <td style="border:1px solid #006600;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?php if($r->tm_subj) echo $r->tm_subj ;?></td>
						    <td style="border:1px solid #006600;" align="center"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->school ? $r->school : '&nbsp;'?></td>
							<td style="border:1px solid #006600;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
						  </tr>
						  <?php } } ?>
						</table>
	            	</div>
            	</div>
            	<div id="fragment-15"> <br/>
	            	<div style="width:640px;height:300px; overflow-y: auto;" align="left" class="style2">
	            		<table class="style2"  width="640"  border="1px solid #006600;" cellspacing="1" cellpadding="1" style="border:1px solid #006600;">
						  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/selectedstudent_01.jpg )">
						    <td style="border:1px solid #006600;" width="40" align="center"><input type="submit" name="btncancel" value="ยกเลิก" style="border: 2px solid #00ff0; background:#D2FFD2; color:#00000;"/></td>
						    <td style="border:1px solid #006600;" width="40" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
						    <td style="border:1px solid #006600;" width="70" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
						    <td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
						    <td style="border:1px solid #006600;" width="80"align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
						    <td style="border:1px solid #006600;" width="50"align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
							<td style="border:1px solid #006600;" width="50" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
							<td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
							<td style="border:1px solid #006600;" width="20"align="center"><font color="#ffffff"><b>เพศ</b></font></td>
						  </tr>
						  <?php
						  	
			              	if(isset($selected_stu) && count($selected_stu) > 0) {
			              		foreach ($selected_stu as $r) {
			              			if($r->dayy != 'fri')
			              			   continue;
			              ?>
						  <tr >
						    <td style="border:1px solid #006600;" align="center"> <input type="checkbox" name="cancel_chk[]" value="<?= $r->student_id?>,fri,<?= $r->maching_id?>,<?= $r->t_id?>" /></td>
						    <td style="border:1px solid #006600;"><?php if($r->study_start_date) {
						    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
						    }else{ echo '&nbsp;';}?></td>
						    <td style="border:1px solid #006600;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?php if($r->tm_subj) echo $r->tm_subj ;?></td>
						    <td style="border:1px solid #006600;" align="center"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->school ? $r->school : '&nbsp;'?></td>
							<td style="border:1px solid #006600;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
						  </tr>
						  <?php } } ?>
						</table>
	            	</div>
            	</div>
            	<div id="fragment-16"> <br/>
	            	<div style="width:640px;height:300px; overflow-y: auto;" align="left" class="style2">
	            		<table class="style2"  width="640"  border="1px solid #006600;" cellspacing="1" cellpadding="1" style="border:1px solid #006600;">
						  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/selectedstudent_01.jpg )">
						    <td style="border:1px solid #006600;" width="40" align="center"><input type="submit" name="btncancel" value="ยกเลิก" style="border: 2px solid #00ff0; background:#D2FFD2; color:#00000;"/></td>
						    <td style="border:1px solid #006600;" width="40" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
						    <td style="border:1px solid #006600;" width="70" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
						    <td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
						    <td style="border:1px solid #006600;" width="80"align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
						    <td style="border:1px solid #006600;" width="50"align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
							<td style="border:1px solid #006600;" width="50" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
							<td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
							<td style="border:1px solid #006600;" width="20"align="center"><font color="#ffffff"><b>เพศ</b></font></td>
						  </tr>
						  <?php
						  	
			              	if(isset($selected_stu) && count($selected_stu) > 0) {
			              		foreach ($selected_stu as $r) {
			              			if($r->dayy != 'sat')
			              			   continue;
			              ?>
						  <tr >
						    <td style="border:1px solid #006600;" align="center"> <input type="checkbox" name="cancel_chk[]" value="<?= $r->student_id?>,sat,<?= $r->maching_id?>,<?= $r->t_id?>" /></td>
						    <td style="border:1px solid #006600;"><?php if($r->study_start_date) {
						    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
						    }else{ echo '&nbsp;';}?></td>
						    <td style="border:1px solid #006600;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?php if($r->tm_subj) echo $r->tm_subj;?></td>
						    <td style="border:1px solid #006600;" align="center"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->school ? $r->school : '&nbsp;'?></td>
							<td style="border:1px solid #006600;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
						  </tr>
						  <?php } } ?>
						</table>
	            	</div>
	            	</div>
            	<div id="fragment-17"> <br/>
	            	<div style="width:640px;height:300px; overflow-y: auto;" align="left" class="style2">
	            		<table class="style2"  width="640"   border="1px solid #006600;" cellspacing="1" cellpadding="1" style="border:1px solid #006600;">
						  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/selectedstudent_01.jpg )">
						   <td style="border:1px solid #006600;" width="40" align="center"><input type="submit" name="btncancel" value="ยกเลิก" style="border: 2px solid #00ff0; background:#D2FFD2; color:#00000;"/></td>
						    <td style="border:1px solid #006600;" width="40" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
						    <td style="border:1px solid #006600;" width="70" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
						    <td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
						    <td style="border:1px solid #006600;" width="80"align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
						    <td style="border:1px solid #006600;" width="50"align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
						    <td style="border:1px solid #006600;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
							<td style="border:1px solid #006600;" width="50" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
							<td style="border:1px solid #006600;" width="30" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
							<td style="border:1px solid #006600;" width="20"align="center"><font color="#ffffff"><b>เพศ</b></font></td>
						  </tr>
						  <?php
						  	
			              	if(isset($selected_stu) && count($selected_stu) > 0) {
			              		foreach ($selected_stu as $r) {
			              			if($r->dayy != 'sun')
			              			   continue;
			              ?>
						  <tr >
						    <td style="border:1px solid #006600;" align="center"> <input type="checkbox" name="cancel_chk[]" value="<?= $r->student_id?>,sun,<?= $r->maching_id?>,<?= $r->t_id?>" /></td>
						    <td style="border:1px solid #006600;"><?php if($r->study_start_date) {
						    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
						    }else{ echo '&nbsp;';}?></td>
						    <td style="border:1px solid #006600;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?php if($r->tm_subj) echo $r->tm_subj;?></td>
						    <td style="border:1px solid #006600;" align="center"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
						    <td style="border:1px solid #006600;"><?= $r->school ? $r->school : '&nbsp;'?></td>
							<td style="border:1px solid #006600;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
							<td style="border:1px solid #006600;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
						  </tr>
						  <?php } } ?>
						</table>
	            	</div>
	            	
            	</div>
            	</div>
            </td>
          </tr>
          <tr>
            <td><img src="<?=base_url()?>images/tutorlogin/green_03.jpg" width="736" height="40" /></td>
          </tr>
        </table></form>
        <br/>
        <table width="736" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td><img src="<?=base_url()?>images/tutorlogin/documentdownload_01.jpg" width="736"  border="0" /></td>
          </tr>
          <tr>
            <td background="<?=base_url()?>images/tutorlogin/documentdownload_02.jpg" align="center">
            	<div style="width:80%" align="left" class="style2">
            		<table cellpadding="1" cellspacing="1" class="style2">
            			<tr valign="top">
            				<td>&gt;</td>
            				<td>กรุณาพิมพ์ใบสมัครเรียนในหน้าถัดไป (พิมพ์สีหรือขาว-ดำก็ได้) เพื่อนำไปให้นักเรียนกรอกหลังการเรียนในครั้งแรก </td>
            			</tr>
            			<tr valign="top">
            				<td>&gt;</td>
            				<td>ในใบสมัครเรียนประกอบไปด้วย 3 ส่วน นักเรียนจะต้องกรอกด้วยตนเองสำหรับส่วนที่ 1 และส่วนที่ 2 สำหรับส่วนที่ 3 นั้น อาจให้นักเรียนกรอก หรือเพื่อให้ติวเตอร์ได้ทำความรู้จักกับนักเรียนมากขึ้น ติวเตอร์อาจใช้วิธีถาม-ตอบและเป็นผู้จดรายละเอียด ด้วยตนเองแทนก็ได้ค่ะ</td>
            			</tr>
            			<tr valign="top">
            				<td>&gt;</td>
            				<td>เมื่อได้ข้อมูลแล้ว กรุณาพิมพ์ลงในหน้าที่ 3 และ 4 ของไฟล์นี้ (จะมีข้อมูลบางส่วนที่เกี่ยวกับการเรียนการสอน แต่ไม่เกี่ยวกับนักเรียน ติวเตอร์กรุณาเติมด้วยตนเองให้ครบนะคะ ไม่ต้องจัดหน้ากระดาษหรือจัดบรรทัดก็ได้ค่ะ)</td>
            			</tr>
            			<tr valign="top">
            				<td>&gt;</td>
            				<td>ส่งข้อมูลหน้า 3 และ 4 เป็นไฟล์ Windows 2003 มาที่ทั้งสองเมลนี้เลยค่ะ <a href="mailto:tutorland@hotmail.co.th" class="style1">tutorland@hotmail.co.th</a> และ<a href="mailto:tutorland@windowslive.com" class="style1"> tutorland@windowslive.com</a></td>
            			</tr>
            			<tr valign="top">
            				<td>&gt;</td>
            				<td>หากหลังจากมีการตรวจสอบและพบว่าติวเตอร์ได้ทำไม่ครบตามขั้นตอน หรือข้อมูลในใบสมัครไม่ตรงตามความเป็นจริง จะถือว่าติวเตอร์ท่านนั้นไม่ได้ไปทำการสอนตามที่นัดหมายไว้ และทางสถาบันขอสงวนสิทธิ์ไม่จัดนักเรียนคนต่อไปให้นะคะ</td>
            			</tr>
            			<tr valign="top">
            				<td>&nbsp;</td>
            				<td>&nbsp;</td>
            			</tr>
            			<tr valign="top">
            				<td>&nbsp;</td>
            				<td align="right"><a href="<?=site_url()?>data-image/file_management/<?=$banner['file_name']?>" target="_blank" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image65','','<?=site_url()?>images/tutornewsroll_41.jpg',1)"><img src="<?=site_url()?>images/tutornews_41.jpg" name="Image65" width="150" height="30" border="0" id="Image65" /></a></td>
            			</tr>
            		</table>
            	</div>
            </td>
          </tr>
          <tr>
            <td><img src="<?=base_url()?>images/tutorlogin/documentdownload_03.jpg" width="736"  /></td>
          </tr>
        </table>
        <br/>
       <form name="myForm3" method="post" action="#" onsubmit="return addDetail();">
       <input type="hidden" name="tutorID" id="tutorID" value="<?php echo $tutor_id?>" />
        <table width="736" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr>
            <td><img src="<?=base_url()?>images/tutorlogin/brown_01.jpg" width="736" height="100" /></td>
          </tr>
          <tr>
            <td background="<?=base_url()?>images/tutorlogin/brown_02.jpg" align="center">
            <div style="width:600px" align="left" class="style2">ติวเตอร์กรุณาเลือกนักเรียนที่มีวิชา ระดับชั้น เวลาว่าง และสถานที่ที่ต้องการเรียน ตรงกับตนเองค่ะ <br/>
            เมื่อเลือกนักเรียนแล้ว ต้องมั่นใจว่าอีกสองสัปดาห์ในวันและเวลาเดียวกันต้องว่างไปสอนนะคะ</div>
            	<br/>
            <div id="tabs2" style="width:650px;">
			    <ul>
			        <li><a href="#fragment-1"><span>จันทร์</span></a></li>
			        <li><a href="#fragment-2"><span>อังคาร</span></a></li>
			        <li><a href="#fragment-3"><span>พุธ</span></a></li>
			        <li><a href="#fragment-4"><span>พฤหัสบดี</span></a></li>
			        <li><a href="#fragment-5"><span>ศุกร์</span></a></li>
			        <li><a href="#fragment-6"><span>เสาร์</span></a></li>
			        <li><a href="#fragment-7"><span>อาทิตย์</span></a></li>
			    </ul>
			    <div id="fragment-1"> <br/>
			        <div style="width:640px; overflow:auto; height:460px;" align="left" class="style2" >
            		<table class="style2" width="900px" border="1px solid #993300;" cellspacing="1" cellpadding="1" style="border:1px solid #993300;">
					  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/browntable_01.jpg)" >
					    <td style="border:1px solid #993300;" align="center"><input type="submit" name="btnselected_mon" value="เลือก" style="border: 2px solid #993300; background:#FFDDBB; color:#000000;"/></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
					    <td style="border:1px solid #993300;width=45px;" align="center"><font color="#ffffff"><b>เวลา</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
					    <td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>เพศ</b></font></td>
					  </tr>
					  <?php
		              	if(isset($select_stu_mon) && count($select_stu_mon) > 0) {
		              		$ii = 0;
		              		foreach ($select_stu_mon as $r) {
		              			if($ii % 2 == 0) {
		              				echo '<tr>';
		              			} else {
		              				echo '<tr bgcolor="#FFDDBB">';
		              			}
		              			$ii++;
		              ?>
					  
					  	<td style="border:1px solid #993300;"  align="center"> 
					  		<input type="checkbox" name="selected_chk[]" value="<?= $r->student_id?>,mon" />
					  		<input type="hidden" name="stu_detail[]" value="<?= $r->study_add_distinct?>|<?= $r->current_class?>|จันทร์" />
					  		<input type="hidden" name="stu_subj_detail[]"  />
					  		<input type="hidden" name="stu_time_detail[]"  />
					  	</td>
					    <td style="border:1px solid #993300;"><?php if($r->study_start_date) {
					    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
					    }else{ echo '&nbsp;';}?></td>
					    <td style="border:1px solid #993300;"><?= $r->study_time_mon ? $r->study_time_mon : '&nbsp;'?></td>						    
					   <td style="border:1px solid #993300;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?php if($r->booking_subject01) echo $r->booking_subject01 . ' ';
					    if($r->booking_subject02) echo $r->booking_subject02 . ' ';
					    if($r->booking_subject03) echo $r->booking_subject03 . ' ';
					    if($r->booking_subject04) echo $r->booking_subject04 . ' ';
					    if($r->booking_subject05) echo $r->booking_subject05 . ' ';
					    if($r->booking_subject06) echo $r->booking_subject06 . ' ';?></td>
					    <td style="border:1px solid #993300;"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->school ? $r->school : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
					  </tr>
					  <?php } } ?>
					</table>
            	</div>
			    </div>
			    <div id="fragment-2">
			       <br/>
			       <div style="width:640px; overflow:auto; height:460px;" align="left" class="style2" >
            		<table class="style2" width="900px" border="1px solid #993300;" cellspacing="1" cellpadding="1" style="border:1px solid #993300;">
					  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/browntable_01.jpg)" >
					   <td style="border:1px solid #993300;" align="center"><input type="submit" name="btnselected_tue" value="เลือก" style="border: 2px solid #993300; background:#FFDDBB; color:#000000;"/></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
					    <td style="border:1px solid #993300;width=45px;" align="center"><font color="#ffffff"><b>เวลา</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
					    <td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>เพศ</b></font></td>
					  </tr>
					  <?php
		              	if(isset($select_stu_tue) && count($select_stu_tue) > 0) {
		              		$ii = 0;
		              		foreach ($select_stu_tue as $r) {
		              			if($ii % 2 == 0) {
		              				echo '<tr>';
		              			} else {
		              				echo '<tr bgcolor="#FFDDBB">';
		              			}
		              			$ii++;
		              ?>
					  
					  	<td style="border:1px solid #993300;"  align="center"> <input type="checkbox" name="selected_chk[]" value="<?= $r->student_id?>,tue" /> <input type="hidden" name="stu_detail[]" value="<?= $r->study_add_distinct?>|<?= $r->current_class?>|อังคาร" /><input type="hidden" name="stu_subj_detail[]"  />
					  		<input type="hidden" name="stu_time_detail[]"  /> </td>
					    <td style="border:1px solid #993300;"><?php if($r->study_start_date) {
					    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
					    }else{ echo '&nbsp;';}?></td>
					    <td style="border:1px solid #993300;"><?= $r->study_time_tue ? $r->study_time_tue : '&nbsp;'?></td>						    
					   <td style="border:1px solid #993300;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?php if($r->booking_subject01) echo $r->booking_subject01 . ' ';
					    if($r->booking_subject02) echo $r->booking_subject02 . ' ';
					    if($r->booking_subject03) echo $r->booking_subject03 . ' ';
					    if($r->booking_subject04) echo $r->booking_subject04 . ' ';
					    if($r->booking_subject05) echo $r->booking_subject05 . ' ';
					    if($r->booking_subject06) echo $r->booking_subject06 . ' ';?></td>
					    <td style="border:1px solid #993300;"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->school ? $r->school : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
					  </tr>
					  <?php } } ?>
					</table>
            	</div>
			    </div>
			    <div id="fragment-3">
			        <br/>
			       <div style="width:640px; overflow:auto; height:460px;" align="left" class="style2" >
            		<table class="style2" width="900px" border="1px solid #993300;" cellspacing="1" cellpadding="1" style="border:1px solid #993300;">
					  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/browntable_01.jpg)" >
					    <td style="border:1px solid #993300;" align="center"><input type="submit" name="btnselected_wed" value="เลือก" style="border: 2px solid #993300; background:#FFDDBB; color:#000000;"/></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
					    <td style="border:1px solid #993300;width=45px;" align="center"><font color="#ffffff"><b>เวลา</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
					    <td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>เพศ</b></font></td>
					  </tr>
					  <?php
		              	if(isset($select_stu_wed) && count($select_stu_wed) > 0) {
		              		$ii = 0;
		              		foreach ($select_stu_wed as $r) {
		              			if($ii % 2 == 0) {
		              				echo '<tr>';
		              			} else {
		              				echo '<tr bgcolor="#FFDDBB">';
		              			}
		              			$ii++;
		              ?>
					  
					  	<td style="border:1px solid #993300;"  align="center"> <input type="checkbox" name="selected_chk[]" value="<?= $r->student_id?>,wed" /> <input type="hidden" name="stu_detail[]" value="<?= $r->study_add_distinct?>|<?= $r->current_class?>|พุธ" /><input type="hidden" name="stu_subj_detail[]"  />
					  		<input type="hidden" name="stu_time_detail[]"  /> </td>
					    <td style="border:1px solid #993300;"><?php if($r->study_start_date) {
					    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
					    }else{ echo '&nbsp;';}?></td>
					    <td style="border:1px solid #993300;"><?= $r->study_time_wed ? $r->study_time_wed : '&nbsp;'?></td>						    
					   <td style="border:1px solid #993300;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?php if($r->booking_subject01) echo $r->booking_subject01 . ' ';
					    if($r->booking_subject02) echo $r->booking_subject02 . ' ';
					    if($r->booking_subject03) echo $r->booking_subject03 . ' ';
					    if($r->booking_subject04) echo $r->booking_subject04 . ' ';
					    if($r->booking_subject05) echo $r->booking_subject05 . ' ';
					    if($r->booking_subject06) echo $r->booking_subject06 . ' ';?></td>
					    <td style="border:1px solid #993300;"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->school ? $r->school : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
					  </tr>
					  <?php } } ?>
					</table>
            	</div>
			    </div>
			    <div id="fragment-4">
			        <br/>
			       <div style="width:640px; overflow:auto; height:460px;" align="left" class="style2" >
            		<table class="style2" width="900px" border="1px solid #993300;" cellspacing="1" cellpadding="1" style="border:1px solid #993300;">
					  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/browntable_01.jpg)" >
					    <td style="border:1px solid #993300;" align="center"><input type="submit" name="btnselected_thr" value="เลือก" style="border: 2px solid #993300; background:#FFDDBB; color:#000000;"/></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
					    <td style="border:1px solid #993300;width=45px;" align="center"><font color="#ffffff"><b>เวลา</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
					    <td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>เพศ</b></font></td>
					  </tr>
					  <?php
		              	if(isset($select_stu_thr) && count($select_stu_thr) > 0) {
		              		$ii = 0;
		              		foreach ($select_stu_thr as $r) {
		              			if($ii % 2 == 0) {
		              				echo '<tr>';
		              			} else {
		              				echo '<tr bgcolor="#FFDDBB">';
		              			}
		              			$ii++;
		              ?>
					  
					  	<td style="border:1px solid #993300;"  align="center"> <input type="checkbox" name="selected_chk[]" value="<?= $r->student_id?>,thr" /> <input type="hidden" name="stu_detail[]" value="<?= $r->study_add_distinct?>|<?= $r->current_class?>|พฤหัส" /><input type="hidden" name="stu_subj_detail[]"  />
					  		<input type="hidden" name="stu_time_detail[]"  /> </td>
					    <td style="border:1px solid #993300;"><?php if($r->study_start_date) {
					    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
					    }else{ echo '&nbsp;';}?></td>
					    <td style="border:1px solid #993300;"><?= $r->study_time_thr ? $r->study_time_thr : '&nbsp;'?></td>						    
					   <td style="border:1px solid #993300;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?php if($r->booking_subject01) echo $r->booking_subject01 . ' ';
					    if($r->booking_subject02) echo $r->booking_subject02 . ' ';
					    if($r->booking_subject03) echo $r->booking_subject03 . ' ';
					    if($r->booking_subject04) echo $r->booking_subject04 . ' ';
					    if($r->booking_subject05) echo $r->booking_subject05 . ' ';
					    if($r->booking_subject06) echo $r->booking_subject06 . ' ';?></td>
					    <td style="border:1px solid #993300;"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->school ? $r->school : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
					  </tr>
					  <?php } } ?>
					</table>
            	</div>
			    </div>
			    <div id="fragment-5">
			        <br/>
			       <div style="width:640px; overflow:auto; height:460px;" align="left" class="style2" >
            		<table class="style2" width="900px" border="1px solid #993300;" cellspacing="1" cellpadding="1" style="border:1px solid #993300;">
					  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/browntable_01.jpg)" >
					    <td style="border:1px solid #993300;" align="center"><input type="submit" name="btnselected_fri" value="เลือก" style="border: 2px solid #993300; background:#FFDDBB; color:#000000;"/></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
					    <td style="border:1px solid #993300;width=45px;" align="center"><font color="#ffffff"><b>เวลา</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
					    <td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>เพศ</b></font></td>
					  </tr>
					  <?php
		              	if(isset($select_stu_fri) && count($select_stu_fri) > 0) {
		              		$ii = 0;
		              		foreach ($select_stu_fri as $r) {
		              			if($ii % 2 == 0) {
		              				echo '<tr>';
		              			} else {
		              				echo '<tr bgcolor="#FFDDBB">';
		              			}
		              			$ii++;
		              ?>
					  
					  	<td style="border:1px solid #993300;"  align="center"> <input type="checkbox" name="selected_chk[]" value="<?= $r->student_id?>,fri" /> <input type="hidden" name="stu_detail[]" value="<?= $r->study_add_distinct?>|<?= $r->current_class?>|ศุกร์" /> <input type="hidden" name="stu_subj_detail[]"  />
					  		<input type="hidden" name="stu_time_detail[]"  /> </td>
					    <td style="border:1px solid #993300;"><?php if($r->study_start_date) {
					    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
					    }else{ echo '&nbsp;';}?></td>
					    <td style="border:1px solid #993300;"><?= $r->study_time_fir ? $r->study_time_fir : '&nbsp;'?></td>						    
					   <td style="border:1px solid #993300;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?php if($r->booking_subject01) echo $r->booking_subject01 . ' ';
					    if($r->booking_subject02) echo $r->booking_subject02 . ' ';
					    if($r->booking_subject03) echo $r->booking_subject03 . ' ';
					    if($r->booking_subject04) echo $r->booking_subject04 . ' ';
					    if($r->booking_subject05) echo $r->booking_subject05 . ' ';
					    if($r->booking_subject06) echo $r->booking_subject06 . ' ';?></td>
					    <td style="border:1px solid #993300;"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->school ? $r->school : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
					  </tr>
					  <?php } } ?>
					</table>
            	</div>
			    </div>
			    <div id="fragment-6">
			        <br/>
			       <div style="width:640px; overflow:auto; height:460px;" align="left" class="style2" >
            		<table class="style2" width="900px" border="1px solid #993300;" cellspacing="1" cellpadding="1" style="border:1px solid #993300;">
					  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/browntable_01.jpg)" >
					    <td style="border:1px solid #993300;" align="center"><input type="submit" name="btnselected_sat" value="เลือก" style="border: 2px solid #993300; background:#FFDDBB; color:#000000;"/></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
					    <td style="border:1px solid #993300;width=45px;" align="center"><font color="#ffffff"><b>เวลา</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
					    <td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>เพศ</b></font></td>
					  </tr>
					  <?php
		              	if(isset($select_stu_sat) && count($select_stu_sat) > 0) {
		              		$ii = 0;
		              		foreach ($select_stu_sat as $r) {
		              			if($ii % 2 == 0) {
		              				echo '<tr>';
		              			} else {
		              				echo '<tr bgcolor="#FFDDBB">';
		              			}
		              			$ii++;
		              ?>
					  
					  	<td style="border:1px solid #993300;"  align="center"> <input type="checkbox" name="selected_chk[]" value="<?= $r->student_id?>,sat" /> <input type="hidden" name="stu_detail[]" value="<?= $r->study_add_distinct?>|<?= $r->current_class?>|เสาร์" /> <input type="hidden" name="stu_subj_detail[]"  />
					  		<input type="hidden" name="stu_time_detail[]"  /></td>
					    <td style="border:1px solid #993300;"><?php if($r->study_start_date) {
					    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
					    }else{ echo '&nbsp;';}?></td>
					    <td style="border:1px solid #993300;"><?= $r->study_time_sat ? $r->study_time_sat : '&nbsp;'?></td>						    
					   <td style="border:1px solid #993300;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?php if($r->booking_subject01) echo $r->booking_subject01 . ' ';
					    if($r->booking_subject02) echo $r->booking_subject02 . ' ';
					    if($r->booking_subject03) echo $r->booking_subject03 . ' ';
					    if($r->booking_subject04) echo $r->booking_subject04 . ' ';
					    if($r->booking_subject05) echo $r->booking_subject05 . ' ';
					    if($r->booking_subject06) echo $r->booking_subject06 . ' ';?></td>
					    <td style="border:1px solid #993300;"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->school ? $r->school : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
					  </tr>
					  <?php } } ?>
					</table>
            	</div>
			    </div>
			    <div id="fragment-7">
			        <br/>
			       <div style="width:640px; overflow:auto; height:460px;" align="left" class="style2" >
            		<table class="style2" width="900px" border="1px solid #993300;" cellspacing="1" cellpadding="1" style="border:1px solid #993300;">
					  <tr style="background-image:url(<?=site_url()?>images/tutorlogin/browntable_01.jpg)" >
					    <td style="border:1px solid #993300;" align="center"><input type="submit" name="btnselected_sun" value="เลือก" style="border: 2px solid #993300; background:#FFDDBB; color:#000000;"/></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>วันที่เริ่ม</b></font></td>
					    <td style="border:1px solid #993300;width=45px;" align="center"><font color="#ffffff"><b>เวลา</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>สถานที่เรียน</b></font></td>
					    <td style="border:1px solid #993300;width=60px;" align="center"><font color="#ffffff"><b>วิชา</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>ชั้น</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>แผนการเรียน</b></font></td>
					    <td style="border:1px solid #993300;width=50px;" align="center"><font color="#ffffff"><b>หลักสูตร</b></font></td>
					    <td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>โรงเรียน</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อจริง</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>ชื่อเล่น</b></font></td>
						<td style="border:1px solid #993300;" align="center"><font color="#ffffff"><b>เพศ</b></font></td>
					  </tr>
					  <?php
		              	if(isset($select_stu_sun) && count($select_stu_sun) > 0) {
		              		$ii = 0;
		              		foreach ($select_stu_sun as $r) {
		              			if($ii % 2 == 0) {
		              				echo '<tr>';
		              			} else {
		              				echo '<tr bgcolor="#FFDDBB">';
		              			}
		              			$ii++;
		              ?>
					  
					  	<td style="border:1px solid #993300;"  align="center"> <input type="checkbox" name="selected_chk[]" value="<?= $r->student_id?>,sun" /> <input type="hidden" name="stu_detail[]" value="<?= $r->study_add_distinct?>|<?= $r->current_class?>|อาทิตย์" /> <input type="hidden" name="stu_subj_detail[]"  />
					  		<input type="hidden" name="stu_time_detail[]"  /></td>
					    <td style="border:1px solid #993300;"><?php if($r->study_start_date) {
					    	echo strftime("%d",strtotime($r->study_start_date)) . ' ' . $monthTh[ (int) strftime("%m",strtotime($r->study_start_date))];
					    }else{ echo '&nbsp;';}?></td>
					    <td style="border:1px solid #993300;"><?= $r->study_time_sun ? $r->study_time_sun : '&nbsp;'?></td>						    
					   <td style="border:1px solid #993300;"><?= $r->study_add_distinct ? $r->study_add_distinct : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?php if($r->booking_subject01) echo $r->booking_subject01 . ' ';
					    if($r->booking_subject02) echo $r->booking_subject02 . ' ';
					    if($r->booking_subject03) echo $r->booking_subject03 . ' ';
					    if($r->booking_subject04) echo $r->booking_subject04 . ' ';
					    if($r->booking_subject05) echo $r->booking_subject05 . ' ';
					    if($r->booking_subject06) echo $r->booking_subject06 . ' ';?></td>
					    <td style="border:1px solid #993300;"><?= $r->current_class ? $r->current_class : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->plan_edu ? $r->plan_edu : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->course_type ? $r->course_type : '&nbsp;'?></td>
					    <td style="border:1px solid #993300;"><?= $r->school ? $r->school : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->first_name ? $r->first_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;"><?= $r->nick_name ? $r->nick_name : '&nbsp;'?></td>
						<td style="border:1px solid #993300;" align="center"><?php if($r->title == 'นาย' || $r->title == 'ด.ช.') echo 'ช'; else echo 'ญ';?></td>
					  </tr>
					  <?php } } ?>
					</table>
            	</div>
			    </div>
			</div>
            </td>
          </tr>
          <tr>
            <td><img src="<?=base_url()?>images/tutorlogin/brown_03.jpg" width="736" height="40" /></td>
          </tr>
        </table>
        <div id="dialogDetail" title="รายละเอียดการสอน"></div>
        </form>
        </td>
        <td width="90" height="1566" rowspan="3" valign="top"><img src="<?=site_url()?>images/toparent_18.jpg" width="90" height="2250" alt="" /></td>
      </tr>
</table>

</td>
</tr>
</table>
<div id="dialogNews" title="ข่าวการศึกษา"></div>

<div id="dialogChange" title="เปลี่ยนพาสเวิร์ด">
	<form name="myForm1" method="post" action="<?=site_url()?>TutorLogin/savePassword" onsubmit="return validate();">
	<table width="350px" align="center" cellpadding="2" cellspacing="2" style="background-color: #FFFFFF" class="style2">
	  <tr>
	    <td align="right" ><label>รหัสผ่านเดิม</label><span class="red">*</span> </td>
	    <td align="left">
	      <input name="txtOldPass" type="password" id="txtOldPass" size="25" maxlength="20" />    
	    </td>
	  </tr>
	  <tr>
	    <td align="right"><label>รหัสผ่านใหม่<span class="red">*</span></label></td>
	    <td align="left">
	    	<input name="txtNewPass1" type="password" id="txtNewPass1" size="25" maxlength="20" />   
	    </td>
	  </tr>
	  <tr>
	    <td align="right"><label>รหัสผ่านใหม่  (คอนเฟิร์ม)<span class="red">*</span></label></td>
	    <td align="left">
	    	<input name="txtNewPass2" type="password" id="txtNewPass2" size="25" maxlength="20" />   
	    </td>
	  </tr>
	  <tr>
	    <td align="right">&nbsp;</td>
	    <td align="left">
	    	<input name="sub" type="submit" value="บันทึกข้อมูล" />   
	    </td>
	  </tr>
	</table>
	</form>
</div>